<div class="tableToolbar">
    <div class="coll-md-8" id="addInput">
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="真实姓名" ng-model="ctrlScope.itemsearch.realname">
        </div>
        <div class="coll-md-2">
            <input type="text" class='search' placeholder="手机号" ng-model="ctrlScope.itemsearch.mobile">
        </div>
        <div class="coll-md-1">
            <div class="coll-md-10 triangle">
                <select class="form-control" ng-model="ctrlScope.itemsearch.status">
                    <option selected disabled hidden value="">状态</option>
                    <option value="2">未发放</option>
                    <option value="1">已发放</option>
                </select>
            </div>
        </div>
        <div class="coll-md-2">
            <input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
            <input type="button" class="small-icon search2" value="搜索">
            <input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
            <input type="button" class="small-icon reset" value="重置">
        </div>
    </div>
    <div class="coll-md-2">
        <input type="button" class="bttn pos-left"  ng-click="addOrderModal()" value="新建">
        <button class="small-icon btn btn-default pos-right" id="itemExport" ng-click="download()">
            <i class="fa fa-download" ></i>
        </button>
    </div>
</div>
<table ui-table="orderParams">
    <thead>
    <tr>
        <th>ID</th>
        <th>手机号码</th>
        <th>真实姓名</th>
        <th>奖励名称</th>
        <th>是否发放</th>
        <th>添加时间</th>
    </tr>
    </thead>
    <tbody>
    <tr ng-repeat="item in orderParams.$rows">
        <td>{{item.id}}</td>
        <td>{{item.userMobile}}</td>
        <td>{{item.realname}}</td>
        <td>{{item.goodsName}}</td>
        <td>{{item.status | lotteryLogStatus}}</td>
        <td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
    </tr>
    </tbody>
</table>
<modal title="新建" visible="addModal">
    <form class="form-horizontal" role="form" name="myForm" ng-submit="saveSubmit(myForm.$valid)" novalidate>
        <div class="form-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">用户名：</label>
                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.username" required>
                        </div>
                    </div>
                </div>
                <!--<div class="col-md-6">-->
                    <!--<div class="form-group">-->
                        <!--<label class="control-label col-md-4">优惠券类型：</label>-->
                        <!--<div class="col-md-8 triangle-left">-->
                            <!--<select ng-model="add.couponType" class="form-control" required ui-select2="select2Options">-->
                                <!--<option value="" disabled hidden selected>请选择</option>-->
                                <!--<option value="1">红包</option>-->
                                <!--<option value="2">加息券</option>-->
                                <!--<option value="3">代金券</option>-->
                            <!--</select>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
                <input type="hidden" value='1' ng-model="add.couponType">
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">途径：</label>

                        <div class="col-md-8">
                            <input type="text" class="form-control" ng-model="add.way" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">金额：</label>

                        <div class="col-md-8 yuan">
                            <input type="number" class="form-control" ng-model="add.amount" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">使用条件金额：</label>

                        <div class="col-md-8 yuan">
                            <input type="number" class="form-control" ng-model="add.requireAmount" required>
                        </div>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label class="control-label col-md-4">有效时间：</label>
                        <div class="col-md-8">
                            <p class="input-group inline">
                                <input type="text" class="form-control" placeholder="有效时间" uib-datepicker-popup="yyyy-MM-dd"
                                       ng-model="add.expiredTime"  is-open="popup3.opened" datepicker-options="dateOptions"/>
						                <span class="input-group-btn" required>
							            <button type="button" class="btn btn-default" ng-click="open3()"><i
                                                class="glyphicon glyphicon-calendar"></i></button>
							            </span>
                            </p>
                        </div>

                    </div>
                </div>
            </div>
            <div class="buttonArea col-md-12">
                <button type="submit" class="btn blue" ng-disabled="myForm.$invalid">保存</button>
            </div>

        </div>
    </form>
</modal>
